{% extends 'base.html' %}
{% block app_content %}
    <table width="100%  " height="288" border="0" align="center"
           cellpadding="0"
           cellspacing="0" bgcolor="#FFFFFF">
        <tr>
            <td align="center" valign="top">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td height="10" colspan="4">&nbsp;<hr
                                style=" height:1px;border:none;border-top:1px dotted #185598;"/>
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">&nbsp;</td>
                        <td width="20"
                            background="{{ url_for('static',filename='admin/images/manage_leftTitle_left.gif') }}">&nbsp;
                        </td>
                        <td width="1050" align="center"
                            background="{{ url_for('static',filename='admin/images/manage_leftTitle_mid.gif') }}"
                            class="word_white"><b>task列表</b></td>
                        <td width="20"
                            background="{{ url_for('static',filename='admin/images/manage_leftTitle_right.gif') }}">
                        </td>
                        <td>&nbsp;</td>
                    </tr>
                    <table style="font-size:15px;" width="95%" height="30"
                           border="0" cellpadding="0"
                           cellspacing="0">
                        <tr>
                            <td valign="top">
                                <table
                                        width="100%" height="30" border="1"
                                        cellpadding="0" cellspacing="0"
                                        bordercolor="#FFFFFF"
                                        bordercolordark="#FFFFFF"
                                        bordercolorlight="#E6E6E6">
                                    <tr bgcolor="#eeeeee">
                                        <td width="32%">taskid
                                        </td>
                                        <td width="36%">日志</td>
                                        <td width="32%">评审结果</td>
                                    </tr>
                                    {% set task = [] %}
                                    {% for testlog in page_data.items %}
                                        {% if testlog.task_id not in task %}
                                            <tr style="padding:5px;">
                                                <td> {{ testlog.task_id }} </td>
                                                <td>
                                                    <a href="{{ hardware_name }}/{{ testlog.task_id }}">查看日志</a>
                                                </td>
                                                <td>
                                                    <a href="/home/review/{{ testlog.hardware_id }}/{{ testlog.task_id }}">查看评审结果</a>
                                                </td>
                                            </tr>
                                        {% endif %}
                                        {% if task.append(testlog.task_id) %}{% endif %}
                                    {% endfor %}
                                </table>
                                {% if page_data %}
                                    <tbody>
                                    <tr>
                                        <td height="30" align="right">
                                            当前页数：[{{ page_data.page }}/{{ page_data.pages }}]&nbsp;
                                            <a href="{{ url_for('home.get_taskid',hardware_name=hardware_name,page=1) }}">第一页</a>
                                            {% if page_data.has_prev %}
                                                <a href="{{ url_for('home.get_taskid',hardware_name=hardware_name,page=pagination.page-1) }}">上一页</a>
                                            {% endif %}
                                            {% if page_data.has_next %} 　
                                                <a href="{{ url_for('home.get_taskid',hardware_name=hardware_name,page=pagination.page+1) }}">下一页</a>
                                            {% endif %}　
                                                <a href="{{ url_for('home.get_taskid',hardware_name=hardware_name,page=pages) }}">最后一页&nbsp;</a>
                                        </td>
                                    </tr>
                                    </tbody>
                                {% endif %}
                            </td>
                        </tr>
                    </table>
                    </td>
                </table>
            </td>
        </tr>
    </table>
{% endblock %}
